package com.zxq.demo.core.execute;

import com.zxq.demo.core.api.IJobHandler;
import com.zxq.demo.core.utils.SpringContextUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @author zw
 * @description 执行任务
 * @email 2408003640@qq.com
 * @date 2025/6/15 13:01
 */
@Component
public class ExecuteUtils {

    private static ApplicationContext applicationContext;
    public static void execute(String beanName) {
        //TODO 通过beanName执行任务
        IJobHandler jobHandler = SpringContextUtils.getBean(beanName, IJobHandler.class);
        jobHandler.execute("");
    }


}
